import httpRequest from '../../utils/request'
import modules from '../modules'
const defaultRoute = 'ProcessRoute_CraftBill'
const controllerName = 'CraftBill'

export interface ProcessRouteParam {
  CraftBillName: string | null
  PageIndex: number
  PageSize: number
  totalCount: number
 
}


// 获取工艺路线列表
export function ApiGetProcessRoute_CraftBillPageListAsync(param: ProcessRouteParam) {
  return httpRequest({
    url: `${modules.ProcessRouteModuleUrl}/${controllerName}/Get${defaultRoute}PageList`,
    method: "Post",
    data: param,
  });
}


// 获取工艺路线列表
export function ApiGetProcessRoute_CraftBillDetialsPageListAsync(param: ProcessRouteParam) {
  return httpRequest({
    url: `${modules.ProcessRouteModuleUrl}/${controllerName}/Get${defaultRoute}DetialsPageList`,
    method: "Post",
    data: param,
  });
}

// 批量删除工艺路线
export function ApiDeletionProcessRoute_CraftBillAsync(param: string[]) {
  return httpRequest({
    url: `${modules.ProcessRouteModuleUrl}/${controllerName}/Deletion${defaultRoute}`,
    method: "Post",
    data: param,
  });
}


// 添加工艺路线
export function ApiCreateProcessRoute_CraftBillAsync(param: object) {
  return httpRequest({
    url: `${modules.ProcessRouteModuleUrl}/${controllerName}/Create${defaultRoute}`,
    method: "Post",
    data: param,
  });
}


// 更新工艺路线
export function ApiUpdateProcessRoute_CraftBillAsync(param: object) {
  return httpRequest({
    url: `${modules.ProcessRouteModuleUrl}/${controllerName}/Update${defaultRoute}`,
    method: "Post",
    data: param,
  });
}



// 更新工艺路线明细排序
export function ApiUpdateProcessRoute_CraftBillDetialAsync(param: object) {
  return httpRequest({
    url: `${modules.ProcessRouteModuleUrl}/${controllerName}/Update${defaultRoute}Detial`,
    method: "Post",
    data: param,
  });
}



// 删除工艺路线明细
export function ApiDeletionProcessRoute_CraftBillDetialAsync(param: object) {
  return httpRequest({
    url: `${modules.ProcessRouteModuleUrl}/${controllerName}/Deletion${defaultRoute}Detial`,
    method: "Post",
    data: param,
  });
}